﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lab2.Phill
{
    class Prigram
    {
        static void Main1()
        {
             int input = int.Parse(Console.ReadLine());
             Console.WriteLine(Cucles1.Fuctorial(input));
             Console.ReadLine();


        }
    }

    class Cucles1
    {
        public static int Fuctorial(int num)
        {
            int z = 1;
            for (int i = 1; i <= num; i++)
            {
                z *= i;
            }
            return z;
        }
    }
}
